/********************************************************************************
 * AffiliateProgramAction.java
 *
 * Created by Jigar Mistry
 * Last modified Date: Jan 13, 2009 9:59:00 AM by Jigar Mistry
 * Version : 0.1
 * Copyright (c) 2008 - 2009 cyberThink Infotech Pvt. Ltd., All rights reserved.
 ********************************************************************************/
package com.printeverywhere.action;

import com.printeverywhere.delegator.CommonFunctionDelegator;
import com.printeverywhere.dto.AffiliateSettings;

/**
 * @author Jigar Mistry
 *
 */
public class AffiliateProgramAction extends AdminSystemSetup {

	/** */
	private static final long serialVersionUID = 1L;

	private AffiliateSettings affiliateSettings;

	public String execute() {
		this.affiliateSettings = (AffiliateSettings) CommonFunctionDelegator.getObjectById("id", 1, AffiliateSettings.class);
		return SUCCESS;
	}

	public String updateAffiliateProgram() {
		CommonFunctionDelegator.generalUpdatebyobj(this.affiliateSettings);
		addActionMessage("Affiliate program updated successfully.");
		return SUCCESS;
	}

	public AffiliateSettings getAffiliateSettings() {
		return affiliateSettings;
	}

	public void setAffiliateSettings(AffiliateSettings affiliateSettings) {
		this.affiliateSettings = affiliateSettings;
	}
}
